﻿using System;
using System.Xml;

namespace Sasa.QualityTools.CodeAnalysis.Common
{
    public static class XmlNodeExtension
    {
        public static string GetValueOrDefault(this XmlNode node, string defaultValue)
        {
            return (node != null) ? node.Value : defaultValue;
        }

        public static string GetInnerTextOrDefault(this XmlNode node, string defaultValue)
        {
            return (node != null) ? node.InnerText : defaultValue;
        }
    }
}
